<?php
namespace App\Exception;

class Message extends \HyperfException\Json
{
    const CODE = 0;
    
    // 自定义 json 格式
    protected function json()
    {
        return [
            'error'   => $this->getCode(),
            'message' => $this->getMessage()
        ];
    }
}